package com.miaoquan.mqmbg;

import org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl;

/**
 * 解决数据类型映射问题
 *
 * @author Fa
 * @date 2020-03-30 22:01
 */
public class JavaTypeResolverImpl extends JavaTypeResolverDefaultImpl {

    public JavaTypeResolverImpl() {
        super();
        //把数据库的 TINYINT 映射成 Integer
//        super.typeMap.put(Types.TINYINT, new JdbcTypeInformation("TINYINT", new FullyQualifiedJavaType(Integer.class.getName())));
        // 把数据库中的int类型映射成Long
//        super.typeMap.put(Types.INTEGER, new JdbcTypeInformation("INTEGER", new FullyQualifiedJavaType(Long.class.getName())));
    }
}
